package com.ljf.tijian.controller;

import com.ljf.tijian.ApiResponse;
import com.ljf.tijian.pojo.Setmeal;
import com.ljf.tijian.pojo.Users;
import com.ljf.tijian.service.SetmealService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SetmealController {

    @Autowired
    SetmealService setmealService;

    @RequestMapping("/listAllSetmealBySex")
    public ApiResponse listAllSetmealBySex(@RequestBody Users user){
        System.out.println(user.toString());
        return setmealService.listSetmealBySex(user);
    }

    @RequestMapping("/getSetmealById")
    public ApiResponse getSetmealById(@RequestBody Setmeal setmeal){
        return setmealService.getSetmealById(setmeal);
    }
}
